home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / msdos / editors / eedraw / src / ed / eelibs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-26  |  1.8 KB  |  45 lines

  1. /*****************************************************************************
  2. *   Module to handle libraries.                             *
  3. *                                         *
  4. * Written by:  Gershon Elber            IBM PC Ver 1.0,    Oct. 1989    *
  5. *****************************************************************************/
  6.  
  7. #ifndef EELIBS_H
  8. #define EELIBS_H
  9.  
  10. #include "PriorQue.h"
  11.  
  12. /* The snap distance will be same as one pixel in the library definition, so */
  13. /* when libraries are scaled up on loading every pin will be destinuishable. */
  14. #define LIB_SCALE_DRAW    DEFAULT_SNAP_DISTANCE
  15.  
  16. typedef struct LibraryStruct {
  17.     char Name[9];                  /* Name of library loaded. */
  18.     int NumOfParts;            /* Number of parts this library has. */
  19.     PriorQue *Entries;             /* Parts themselves are saved here. */
  20.     struct LibraryStruct *Pnext;          /* Point on next lib in chain. */
  21. } LibraryStruct;
  22.  
  23. void LoadLibrary(void);
  24. void LoadLibraryName(char *FullLibName, char *LibName);
  25. void LoadLibraries(char *LoadLibraryList);
  26. void FreeLibrary(char *LibName);
  27. char **GetLibNames(void);
  28. void ViewLibrary(void);
  29. void DrawLibPart(DrawLibItemStruct *DrawLibItem, int DrawMode, int Color);
  30. void DrawLibPartClear(DrawLibItemStruct *DrawLibItem, int DrawMode);
  31. void SnapLibItemPoint(int OrigX, int OrigY, int *ClosestX, int *ClosestY,
  32.                         DrawLibItemStruct *DrawLibItem);
  33. NetListStruct *FindLibItemNetList(int lx1, int ly1, int lx2, int ly2,
  34.                   BooleanType l1Bus,
  35.                   DrawGenericStruct *Phead,
  36.                   DrawLibItemStruct *DrawLibItem);
  37. BooleanType LibItemInBox(int x1, int y1, int x2, int y2,
  38.                     DrawLibItemStruct *DrawLibItem);
  39. BooleanType PlaceLibItem(DrawLibItemStruct *DrawLibItem);
  40. DrawGenericStruct *LibCreateNewPart(void);
  41. BooleanType RePosLibItem(DrawLibItemStruct *DrawLibItem, int PopPosition);
  42. BooleanType CanDrawChipName(char *LibName);
  43.  
  44. #endif  EELIBS_H
  45.